package com.liguang.rcs.admin.db.entity;


import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.Table;
import com.liguang.rcs.admin.db.converter.JpaAttributeConverter;
import lombok.EqualsAndHashCode;

@Data
@Entity
@Table(name = "dodms_user")
@EqualsAndHashCode(callSuper = true)
public class DodmsUserEntity extends AbstractEntity {

    @Column(name = "username")
    private String userName;

    @Column(name = "password")
    private String password;

    @Column(name = "avatar")
    private String avatar;

    @Column(name = "deleted")
    private Boolean deleted = Boolean.FALSE;

    @Column(name = "role_ids")
    @Convert(converter = JpaAttributeConverter.LongArray2Str.class)
    private Long[] roleIds;

}
